home *** CD-ROM | disk | FTP | other *** search
- /*
- Copyright © 1991-1995 by TopSoft Inc. All rights reserved.
-
- You may distribute this file under the terms of the TopSoft
- Artistic License, accompanying this package.
-
- This file was developed by George (ty) Tempel in connection with TopSoft, Inc..
- See the Modification History for more details.
-
- Product
- About Box
-
- FILE
- ABOtherTopic.h
-
- NAME
- ABOtherTopic.h, part of the ABox project source code,
- responsible for handling the ABOtherTopic class stuff.
-
- DESCRIPTION
- This file contains defines for the about box modules.
-
- DEVELOPED BY
- George (ty) Tempel netromancr@aol.com
- All code in this file, and its associated header file was
- Created by George (ty) Tempel in connection with the TopSoft, Inc.
- "FilterTop" application development, except where noted.
-
- CARETAKER - George (ty) Tempel <netromancr@aol.com>
- Please consult this person for any changes or suggestions to this file.
-
- MODIFICATION HISTORY
-
- dd mmm yy - xxx - patchxx: description of patch
- 13-july-94 - ty - Initial Version Created
- 20-july-94 - ty - initial version released
- 10-apr-95 - ty - added support for TeachText/SimpleText 'ttro'
- documents (but only as text, no pict processing)
- 23-may-95 - ty - changes for compatibility with the CodeWarrior CW6
- release and the associated Universal Headers from Apple:
- most methods that returned references now have "Ref" at
- the end of their methods names to prevent possible collisions
- with datatypes and classes of the same name (older versions
- of the compiler didn't have a problem with this).
- */
-
- /*===========================================================================*/
-
- /*========== Exclusion Macros ============*/
-
- #pragma once
-
- #ifndef _ABOtherTopic_
- #define _ABOtherTopic_
-
-
- /*============ Header Files ==============*/
-
- //#include "ABLinkedList.h"
- #include "ABTopicList.h"
- #include "ABTopic.h"
- #include "ABPict.h"
- #include "ABText.h"
-
-
- /*=========== External Linkage ===========*/
-
- /*================ Macros ================*/
-
- /*============== Constants ===============*/
-
- // this is a RESERVED dummy resource ID, used to synthesize
- // resources for the ABox things...
- #define kABSyntheticResourceID 5100
- #define kABSyntheticResourceName "\pSynthetic ABox Resource"
-
-
-
- // These are Properties that the caller can play with:
- #define kABbadFileType '????'
- #define kABFolderFileType 'fldr'
- #define kABTeachTextReadOnly 'ttro'
-
- #define kABTopicFileType 'Tfty'
- typedef OSType ABTopicFileType;
- #define kABTopicFileTypeSize (sizeof(ABTopicFileType))
-
- #define kABTopicIsFolder 'TisF'
- #define kABTopicIsFolderSize (sizeof(Boolean))
-
- /*================ Enums =================*/
-
- /*=============== Structs ================*/
-
- /*=============== Typedefs ===============*/
-
- /*=========== Class Definitions ==========*/
-
- #define kABOtherTopicSuperProperties ABTopic
- class ABOtherTopic : public ABTopic
- {
- friend class ABTopicList;
-
- public:
- ABOtherTopic(const FSSpec& inTopicFSSpec);
- virtual ~ABOtherTopic(void);
-
- virtual OSErr GetProperty (ABProperty prop,
- void *ptr,
- long *ptrSize);
- virtual OSErr SetProperty (ABProperty prop,
- void *ptr,
- long ptrSize);
-
- virtual OSErr Draw(WindowPtr window);
- virtual OSErr Update(WindowPtr window);
- virtual Boolean Event(EventRecord *event);
- virtual OSErr Stop(void);
-
- virtual OSErr Resize (Rect const *field);
-
- Boolean HasBlurb(void) const { return this->BlurbRef() != NULL; }
- Boolean DoesntHaveBlurb(void) const { return ! this->HasBlurb(); }
-
- OSType GetFileType(void) const { return this->FileTypeRef(); }
-
- Boolean IsFolder(void) const { return this->GetFileType() == kABFolderFileType; }
- Boolean IsNotFolder(void) const { return ! this->IsFolder(); }
-
- Boolean IsPicture(void) const { return this->GetFileType() == kABPictResource; }
- Boolean IsNotPicture(void) const { return ! this->IsPicture(); }
-
- Boolean IsText(void) const { return this->GetFileType() == kABTextResource; }
- Boolean IsNotText(void) const { return ! this->IsText(); }
-
- Boolean IsTeachTextReadOnly(void) const { return this->GetFileType() == kABTeachTextReadOnly; }
- Boolean IsNotTeachTextReadOnly(void) const { return ! this->IsTeachTextReadOnly(); }
- Boolean IsSimpleTextReadOnly(void) const { return this->IsTeachTextReadOnly(); }
- Boolean IsNotSimpleTextReadOnly(void) const { return ! this->IsSimpleTextReadOnly(); }
-
- protected:
- virtual OSErr DoLoad (void);
- virtual OSErr DoCheckSlides (void);
-
- virtual OSErr OpenTopic (void);
- virtual OSErr CloseTopic (void);
-
- private:
- ABResource* mBlurb;
- OSType mFileType;
-
- ABResource*& BlurbRef(void) const { return this->mBlurb; }
- OSType& FileTypeRef(void) const { return this->mFileType; }
-
- };
-
-
-
-
-
-
- /*========== Function Prototypes =========*/
-
-
-
-
- #endif // _ABOtherTopic_
-
-